/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *
 * @author Thomas
 */
@Entity
public class Tarrif implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "TARRIF_ID", nullable = false)
    private Long id;
   
    private String name;
    
    private BigDecimal pricePerKG;
    
    private BigDecimal pricePerKM;
    
    private BigDecimal deliveryFee;

    /**
     * Get the value of deliveryFee
     *
     * @return the value of deliveryFee
     */
    public BigDecimal getDeliveryFee() {
        return deliveryFee;
    }

    /**
     * Set the value of deliveryFee
     *
     * @param deliveryFee new value of deliveryFee
     */
    public void setDeliveryFee(BigDecimal deliveryFee) {
        this.deliveryFee = deliveryFee;
    }

    /**
     * Get the value of pricePerKM
     *
     * @return the value of pricePerKM
     */
    public BigDecimal getPricePerKM() {
        return pricePerKM;
    }

    /**
     * Set the value of pricePerKM
     *
     * @param pricePerKM new value of pricePerKM
     */
    public void setPricePerKM(BigDecimal pricePerKM) {
        this.pricePerKM = pricePerKM;
    }

    /**
     * Get the value of pricePerKG
     *
     * @return the value of pricePerKG
     */
    public BigDecimal getPricePerKG() {
        return pricePerKG;
    }

    /**
     * Set the value of pricePerKG
     *
     * @param pricePerKG new value of pricePerKG
     */
    public void setPricePerKG(BigDecimal pricePerKG) {
        this.pricePerKG = pricePerKG;
    }

    /**
     * Get the value of name
     *
     * @return the value of name
     */
    public String getName() {
        return name;
    }

    /**
     * Set the value of name
     *
     * @param name new value of name
     */
    public void setName(String name) {
        this.name = name;
    }

    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    
    
    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Tarrif)) {
            return false;
        }
        Tarrif other = (Tarrif) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cz.muni.deliveryservice.entities.Tarrif[ id=" + id + " ]";
    }
    
}
